/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aqu.persistencia.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Verito Ramirez
 *         Victor Jaramillo
 */
@Entity
@Table(name = "cxp_estadoretencion")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "CxpEstadoRetencion.findAll", query = "SELECT s FROM CxpEstadoRetencion s"),
    @NamedQuery(name = "CxpEstadoRetencion.findBycxpCodigoEstRet", query = "SELECT s FROM CxpEstadoRetencion s WHERE s.cxpCodigoEstRet = :cxpCodigoEstRet"),
    @NamedQuery(name = "CxpEstadoRetencion.findBycxpNombreEstRet", query = "SELECT s FROM CxpEstadoRetencion s WHERE s.cxpNombreEstRet = :cxpNombreEstRet")})
public class CxpEstadoRetencion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "CXP_CODIGO_ESTRET")
    private String cxpCodigoEstRet;
    @Size(max = 45)
    @Column(name = "CXP_NOMBRE_ESTRET")
    private String cxpNombreEstRet;
    
    
    public CxpEstadoRetencion() {
    }
    
    public CxpEstadoRetencion(String cxpCodigoEstRet) {
        this.cxpCodigoEstRet = cxpCodigoEstRet;
    }

    public CxpEstadoRetencion(String cxpCodigoEstRet, String cxpNombreEstRet) {
        this.cxpCodigoEstRet = cxpCodigoEstRet;
        this.cxpNombreEstRet = cxpNombreEstRet;
    }

    public String getCxpCodigoEstRet() {
        return cxpCodigoEstRet;
    }

    public void setCxpCodigoEstRet(String cxpCodigoEstRet) {
        this.cxpCodigoEstRet = cxpCodigoEstRet;
    }

    public String getCxpNombreEstRet() {
        return cxpNombreEstRet;
    }

    public void setCxpNombreEstRet(String cxpNombreEstRet) {
        this.cxpNombreEstRet = cxpNombreEstRet;
    }

    

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cxpCodigoEstRet != null ? cxpCodigoEstRet.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CxpEstadoRetencion)) {
            return false;
        }
        CxpEstadoRetencion other = (CxpEstadoRetencion) object;
        if ((this.cxpCodigoEstRet == null && other.cxpCodigoEstRet != null) || (this.cxpCodigoEstRet != null && !this.cxpCodigoEstRet.equals(other.cxpCodigoEstRet))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "clases.CxpEstadoRetencion[ cxpCodigoEstRet=" + cxpCodigoEstRet + " ]";
    }
    
}
